home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-06 | 7.7 KB | 265 lines | [TEXT/MPS ] |
- #ifndef __APPLETALK__
- #include <AppleTalk.h>
- #endif
-
- #ifndef __LISTCONTROL__
- #include <ListControl.h>
- #endif
-
- #ifndef __MENUS__
- #include <Menus.h>
- #endif
-
- #ifndef __STANDARDFILE__
- #include <StandardFile.h>
- #endif
-
-
-
- typedef pascal Boolean (*GRPTProcPtr)(LocationNamePtr locationName, PortInfoPtr thePortInfo);
-
-
-
- /************** AEchess.c **************/
-
- void InitCustomAppleEvents(void);
- pascal OSErr DoAEAnswer(AppleEvent *message, AppleEvent *reply, long refcon);
- OSErr SendGame(FileRecHndl frHndl, short sendReason, StringPtr nbpType);
- pascal OSErr ReceiveGameReply(AppleEvent *message, AppleEvent *reply);
- pascal OSErr ReceiveGame(AppleEvent *message, AppleEvent *reply, long refcon);
- Boolean SendMssg(FileRecHndl frHndl, short messageType);
- pascal OSErr ReceiveMssg(AppleEvent *message, AppleEvent *reply, long refcon);
- WindowPtr GetGameWindow(long gameID_0, long gameID_1);
- pascal Boolean KibitzPortFilter(LocationNamePtr locationName, PortInfoPtr thePortInfo);
- void SetOpponentType(FileRecHndl frHndl, short newOpponentType);
- OSErr GetRemoteProcessTarget(FileRecHndl frHndl, AEDesc *retDesc, GRPTProcPtr proc);
- pascal Boolean FinderFilter(LocationNamePtr locationName, PortInfoPtr thePortInfo);
- pascal Boolean KibitzFilter(LocationNamePtr locationName, PortInfoPtr thePortInfo);
-
-
-
- /************** AppleEvents.c **************/
-
- void InitAppleEvents(void);
- pascal OSErr KibitzAEOpenApplication(AppleEvent *message, AppleEvent *reply, long refcon);
- pascal OSErr KibitzAEOpenDocuments(AppleEvent *message, AppleEvent *reply, long refcon);
- pascal OSErr KibitzAEPrintDocuments(AppleEvent *message, AppleEvent *reply, long refcon);
- pascal OSErr KibitzAEQuitApplication(AppleEvent *message, AppleEvent *reply, long refcon);
- OSErr OpenDocEventHandler(AppleEvent *message, AppleEvent *reply, short mode);
-
-
-
- /************** AppleTalk.c **************/
-
- OSErr DoBuildZoneList(ListHandle listHndl);
- OSErr DoSelectMyZone(ListHandle listHndl);
- OSErr AddPPCNBPAlias(NamesTableEntry *theNTE, Str32 newNBPType, EntityName *newEntity);
- OSErr RemoveNBPAlias(EntityPtr theEntity);
-
-
-
- /************** BoardSlider.c **************/
-
- void AdjustGameSlider(FileRecHndl frHndl);
- ControlHandle BoardSliderNew(WindowPtr window);
- Boolean RepositionBoard(FileRecHndl frHndl, short newPos, Boolean update);
-
-
-
- /************** Chess.c **************/
-
- void NewGame(FileRecHndl game);
- void GenerateLegalMoves(FileRecHndl game);
- void AddLegalMove(FileRecHndl game, short from, short to);
- Boolean CastleOkay(FileRecHndl game, short castleSide);
- void MakeMove(FileRecHndl game, short moveFrom, short moveTo, short promoteTo);
- void UnmakeMove(FileRecHndl game);
- short SquareAttacked(FileRecHndl game, short square, short color);
- void EndTheGame(FileRecHndl game, short endReason);
- short WhosMove(FileRecHndl game);
- void CalcPositionValues(FileRecHndl game);
- short GameStatus(FileRecHndl game);
- short UpdateTime(FileRecHndl game, Boolean canLose);
- void UpdateGameStatus(FileRecHndl game);
- void DrawButtonTitle(FileRecHndl game, short newVal);
- void SlideThePiece(FileRecHndl game, short fromSq, short toSq);
- OSErr InitLogic(void);
- Boolean ComputerMove(FileRecHndl game);
- short BestMove(FileRecHndl game);
- long OneDeepEval(FileRecHndl game, short from, short to, short color);
- short CheckForMate(FileRecHndl game, short nodeDepth, short maxDepth);
-
- short QueenMate(FileRecHndl game);
- short RookMate(FileRecHndl game);
- void GetRowCol(short pos, short *row, short *col);
- void GetDeltas(short pos1, short pos2, short *dr, short *dc, short *absdr, short *absdc);
- void RSpinPosition(short *pos);
- void HFlipPosition(short *pos);
-
-
-
- /************** Config.c **************/
-
- void DoConfigureGame(FileRecHndl frHndl);
-
-
-
- /************** DoCursor.c **************/
-
- void DoCursor(void);
- void DoSetCursor(Cursor *cursor);
- Rect BoardRect(void);
- Rect GlobalBoardRect(WindowPtr window);
-
-
-
- /************** DoEvent.c **************/
-
- short AlertIfGameOver(FileRecHndl frHndl);
- void DoActivate(WindowPtr window, Boolean becomingActive);
- void DoContentClick(WindowPtr window, EventRecord *event);
- void DoEvent(EventRecord *event);
- void DoUpdate(WindowPtr window);
- pascal Boolean statusFilter(DialogPtr dlg, EventRecord *event, short *item);
-
-
-
- /************** EventLoop.c **************/
-
- void EventLoop(void);
-
-
-
- /************** File.c **************/
-
- OSErr AppDisposeDocument(FileRecHndl frHndl);
- Boolean AppDocumentDirty(FileRecHndl frHndl);
- OSErr AppNewDocument(FileRecHndl *returnHndl, short winNameType);
- OSErr AppOpenDocument(FileRecHndl *result, FSSpecPtr fileToOpen, char permission);
- OSErr AppSaveDocument(FileRecHndl frHndl, WindowPtr window, short saveMode);
- void ConvertOldToNewSFReply(SFReply *oldReply, StandardFileReply *newReply);
- OSErr Create_OpenFile(FSSpec *file, short *refNum, OSType theFileType);
- Boolean DisplayGetFile(StandardFileReply *reply);
- Boolean DisplayPutFile(StandardFileReply *reply);
- void IncNewFileNum(Boolean flag);
-
- OSErr AppReadDocument(FileRecHndl frHndl, OSType ftype);
- OSErr AppWriteDocument(FileRecHndl frHndl);
- OSErr AppDuplicateDocument(FileRecHndl oldFrHndl, FileRecHndl *newFrHndl);
- OSErr AppAutoLaunch(FileRecHndl frHndl);
-
-
-
- /************** GoToMove.c **************/
-
- void DoGoToMove(FileRecHndl frHndl);
-
-
-
- /************** Help.c **************/
-
- void DynamicBalloonHelp(void);
-
-
-
- /************** IdleTasks.c **************/
-
- void DoIdleTasks(Boolean allowComputerMoves);
-
-
-
- /************** Init.c **************/
-
- void Initialize(void);
- void StartDocuments(void);
-
-
-
- /************** KibitzWindow.c **************/
-
- OSErr AppNewWindowControls(FileRecHndl frHndl, WindowPtr window, WindowPtr behind);
- void DrawTime(FileRecHndl frHndl);
- void ImageBoardLines(short increment, short hOffset, short vOffset);
- void ImageDocument(FileRecHndl frHndl, Boolean justBoard);
- void ImageMoveList(FileRecHndl frHndl, Rect theInk, short hOffset);
-
-
-
- /************** Menu.c **************/
-
- void AdjustMenus(void);
- void DoMenuCommand(long menuResult, EventRecord *event);
- void EnableOrDisableItem(MenuHandle menu, short item, Boolean enable);
-
-
-
- /************** Notation.c **************/
-
- Boolean AnnotateMove(FileRecHndl frHndl, short printMoveNum, short gameIndex, StringPtr pstr);
- void MovesToOutBox(FileRecHndl frHndl, EventRecord *event);
- void MovesFromText(FileRecHndl frHndl, Handle txt, short len,
- short beg, short end, Boolean slideMoves);
- void MakeVerbose(FileRecHndl frHndl, StringPtr pstr);
- void SayTheMove(FileRecHndl frHndl);
-
-
-
- /************** Offscreen.c **************/
-
- OSErr InitOffscreen(void);
- void MoveThePiece(FileRecHndl frHndl, short fromSq, Rect fromRect, Point fromLoc, Point *toLoc);
-
-
-
- /************** Print.c **************/
-
- OSErr AppPrintDocument(FileRecHndl frHndl, Boolean jobDlg, Boolean firstJob);
- OSErr PresentStyleDialog(FileRecHndl frHndl);
-
-
-
- /************** SaveBoardImage.c **************/
-
- OSErr SaveBoardImage(FileRecHndl frHndl);
-
-
-
- /************** Setup.c **************/
-
- void DoArrangeBoard(FileRecHndl frHndl, EventRecord *event, Point clickLoc);
- void DrawPalette(FileRecHndl frHndl);
- Rect PaletteRect(void);
-
-
-
- /************** Sound.c **************/
-
- OSErr RecordSound(FileRecHndl frHndl);
- Boolean SoundInputAvaliable(void);
-
-
-
- /************** SpeechMessage.c **************/
-
- Boolean SpeechAvailable(void);
- OSErr SayText(TEHandle teH, Handle txt, VoiceSpec theVoice);
-
-
-
- /************** Start.c **************/
-
- void main(void);
-
-
-
- /************** Window.c **************/
-
- OSErr AppNewWindow(FileRecHndl frHndl, WindowPtr *retWindow, WindowPtr behind);
- void AppNewWindowTitle(WindowPtr window);
- Boolean AppWindowDirty(WindowPtr window);
- Boolean CloseAllWindows(void);
- Boolean CloseOneWindow(WindowPtr window, short saveMode);
- WindowPtr SetFilePort(FileRecHndl frHndl);
-
-
-